[mirrors]
https://tls.mbed.org/download/mbedtls-2.2.1-apache.tgz

[vars]
filesize=1863674
sha512=6a74abc4ea225eb6bcf20894bb1a6faa82dbaff11129c41849151e2654570609efeee70d0644ce63c4d2c11e6142b2db262b88f3a22fdceff0a215a64a5d6eb0
tardir=mbedtls-2.2.1

[deps]

[build]
# NOTE: the mirror requires tls, download with curl:
# 	USE_CURL=1 butch install mbedtls
# hiawatha requires these options (see USE_SYSTEM_MBEDTLS in its
# CMakeLists.txt)
echo "#define MBEDTLS_THREADING_C" >> include/mbedtls/config.h
echo "#define MBEDTLS_THREADING_PTHREAD" >> include/mbedtls/config.h

# build the library and all binaries statically (includes
# mbedtls_selftest)
sed -i 's@^\.SILENT:.*$@@' library/Makefile programs/Makefile Makefile
make -j$MAKE_THREADS no_test CFLAGS="$optcflags" LDFLAGS="$optldflags"

make DESTDIR="$butch_install_dir" install

